<?php echo $this->Html->script('schedule', array('inline' => false)); ?>
<?php echo $this->Html->script('plugin/jquery.validate.min', array('inline' => false)); ?>
<?php $model = 'CourseDetail'; 
$openDateArr = date_parse($openDate);
$closeDateArr = date_parse($closeDate);
?>
<?php echo $this->Form->create('CourseDetail', array('url' => array('controller' => $submitController, 'action' => $submitAction, $id), 'id' => 'CourseDetailForm'));?>
	<table class="scheduleForm" id="step01">
		<tr>
			<td class="left"><label for="year">名前</label></td>
			<td>
				<dl>
					<dd><label for="year">開催日</label></dd>
					<dt>
						<?php echo $this->Form->year('', date('Y'), date('Y', strtotime("+3 year")),$openDateArr['year'] , array('empty' => FALSE, 'id' => 'year', 'name' => 'year' )) . '年';?>
						<?php echo $this->Form->month('', $openDateArr['month'], array('id' => 'month', 'name' => 'month', 'monthNames' => FALSE, 'empty' => FALSE)) . '月';?>
						<?php echo $this->Form->day('', $openDateArr['day'], array('id' => 'day', 'name' => 'day', 'empty' => FALSE)) . '日';?>
					</dt>
					<dd><label for="openHour">開催時間</label></dd>
					<dt>
						<?php echo $this->Form->hour('', true, $openDateArr['hour'], array('id' => 'openHour', 'name' => 'openHour', 'empty' => FALSE)) ;?>
						:
						<?php echo $this->Form->minute('', $openDateArr['minute'], array('id' => 'openMinute', 'name' => 'openMinute', 'empty' => FALSE));?>
						〜
						<?php echo $this->Form->hour('', true, $closeDateArr['hour'], array('id' => 'closeHour', 'name' => 'closeHour', 'empty' => FALSE)) ;?>
						:
						<?php echo $this->Form->minute('', $closeDateArr['minute'], array('id' => 'closeMinute', 'name' => 'closeMinute', 'empty' => FALSE));?>
					</dt>
					<dt>
					<div><?php echo $form->error('CourseDetail.opening_date', null, array('class'=>'error-message')); ?></div>
					<div><?php echo $form->error('CourseDetail.closing_date', null, array('class'=>'error-message')); ?></div>
					</dt>
				</dl>
			</td>
		</tr>
		<tr>
			<td class="left"><label for="area">開催場所<br/>キャッチコピー</label></td>
			<td>
				<dl>
					<dd><label for="area">エリア</label></dd>
					<dt>
						<?php echo $this->Form->select('area', $areas, null, array('empty' => false, 'id' => 'area')); ?>
					</dt>
					<dd><label for="zip01">郵便番号</label></dd>
					<dt>
						<div class="formZip">
							<label for="zip01" class="zip01">〒</label>
							<?php echo $this->Form->text('zip01', array('maxlength' => 3, 'size' => 3, 'label' => false, 'div' => false, 'id' => 'zip01', 'class' => 'required number text zip')) ?>
							&nbsp;-&nbsp;
							<?php echo $this->Form->text('zip02', array('maxlength' => 4, 'size' => 4, 'label' => false, 'div' => false, 'id' => 'zip02', 'class' =>'required number text zip'));?>
						</div>
					</dt>
					<dd><label for="city">市区町村</label></dd>
					<dt>
						<?php echo $this->Form->input('address01', array('label' => false,  'id' => 'city', 'class' => 'required text', 'div' => FALSE)) ?>
					</dt>
					<dd><label for="address">番地・建物名</label></dd>
					<dt>
						<?php echo $this->Form->input('address02', array('label' => false, 'class' => 'required text', 'id' => 'address', 'div' => FALSE)) ?>
					</dt>
					<dd><label for="placeName">開催場所名</label></dd>
					<dt>
						<?php echo $this->Form->input('place_name', array('label' => false, 'class' => 'address', 'id' => 'placeName', 'div' => FALSE)) ?>
					</dt>
					<dd>開催地公開設定</dd>
					<dt class="clear">
						<?php echo $this->Form->radio('address_flg', array('1' => '&nbsp;全てのユーザに公開', '0' => '&nbsp;予約したユーザのみに公開'), array('label' => false, 'separator' => '&nbsp;&nbsp;', 'legend' => false, 'value' => $address_flg)) ;?>
					</dt>
				</dl>
			</td>
		</tr>
		<tr>
			<td class="left"><label for="attendTotal">参加内容詳細</label></td>
			<td>
				<dl>
					<dd><label for="attendTotal">最大参加人数</label></dd>
					<dt><?php echo $this->Form->input('attend_total', array('label' => false, 'class' => 'required number text total', 'id' => 'attendTotal', 'div' => FALSE));?></dt>
					<dd><label for="price">参加費用</label></dd>
					<dt>
						<?php echo $this->Form->text('price', array('label' => false, 'class' => 'required number text price', 'id' => 'price', 'div' => FALSE));?>&nbsp;円<br class="br-price" />
						<div><?php echo $form->error('CourseDetail.price', null, array('class'=>'error-message')); ?></div>
					</dt>
				</dl>
			</td>
		</tr>
		<tr>
			<td class="left"><label for="notice">その他 表記事項</label></td>
			<td>
				<?php echo $this->Form->textarea('notice', array('type' => 'textarea','label' => false, 'rows' => 6, 'cols' => 50, 'id' => 'notice', 'class' => '')); ?>
			</td>
		</tr>
		<tr>
			<td colspan="2" class="submit">
				<?php echo $this->Form->submit('btn_edit_shcedule_off.png', array('id' => 'confirmCourse', 'div' => FALSE));?>&nbsp;&nbsp;
				<?php echo $this->Form->submit('btn_cancel_off.png', array('div' => false, 'class' => 'jsBtnBack'));?>
			</td>
		</tr>
	</table>
<?php echo $this->Form->end();?>
<table class="scheduleForm"  id="step02" style="display:none;">
	<tr>
		<td class="left"><label for="year">名前</label></td>
		<td>
			<dl>
				<dd>開催日</dd>
				<dt id="confirm_date">
				</dt>
				<dd>開催時間</dd>
				<dt id="confirm_hour">
				</dt>
			</dl>
		</td>
	</tr>
	<tr>
		<td class="left">開催場所<br/>キャッチコピー</td>
		<td>
			<dl>
				<dd>エリア</dd>
				<dt id="confirm_area">
				</dt>
				<dd>郵便番号</dd>
				<dt id="confirm_zipcode">
				</dt>
				<dd>市区町村</dd>
				<dt id="confirm_city">
				</dt>
				<dd>番地・建物名</dd>
				<dt id="confirm_address">
				</dt>
				<dd>開催場所名</dd>
				<dt id="confirm_place">
				</dt>
				<dd>開催地公開設定</dd>
				<dt id="confirm_address_display">
				</dt>
			</dl>
		</td>
	</tr>
	<tr>
		<td class="left"><label for="attendTotal">参加内容詳細</label></td>
		<td>
			<dl>
				<dd><label for="attendTotal">最大参加人数</label></dd>
				<dt id="confirm_attend_total"></dt>
				<dd><label for="price">参加費用</label></dd>
				<dt id="confirm_price"></dt>
			</dl>
		</td>
	</tr>
	<tr>
		<td class="left"><label for="notice">その他 表記事項</label></td>
		<td id="confirm_notice">
		</td>
	</tr>
	<tr>
		<td colspan="2" class="submit">
			<?php echo $this->Form->submit('btn_edit_shcedule_off.png', array('id' => 'submit_form', 'div' => FALSE));?>&nbsp;&nbsp;
			<?php echo $this->Form->submit('btn_cancel_off.png', array('id' => 'correct', 'div' => FALSE));?>
		</td>
	</tr>
</table>
<?php $this->element('top_link'); ?>
